package f3source.s1predefinedsource;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.sql.Date;
import java.util.ArrayList;

public class s1predefinedsource {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        env.setParallelism(1);

        ArrayList<s131orders> orders = new ArrayList<>();
        orders.add(new s131orders(1,101,200L,"paid", Date.valueOf("2025-04-01")));
        orders.add(new s131orders(2,102,300L,"pending", Date.valueOf("2025-04-02")));

        DataStreamSource<s131orders> orderss = env.fromCollection(orders);

        orderss.print();

        env.execute();

    }
}
